package com.drug.mingkang.service.redis;

import com.drug.mingkang.config.RedisConfig;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

import javax.annotation.Resource;

/**
 * 描述：
 *
 * @version 1.0
 * @author: wcj
 * @Date: 2020/7/13 15:10
 */
@Service
public class RedisService {

    @Resource
    JedisPool jedisPool;

    @Resource
    RedisConfig redisConfig;

    public Jedis getInstance(){
        Jedis jedis = new Jedis(redisConfig.getHost(),
                redisConfig.getPort());
        return jedis;
    }
}
